package com.sjsu.aws.primitve;

/**
 * 
 * @author Deepali Pawar
 * 
 */
public class Primitive {
	private String	serviceName;
	private String	keyName;
	private String	keyType;
	
	public String getServiceName() {
		return serviceName;
	}
	
	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}
	
	public String getKeyName() {
		return keyName;
	}
	
	public void setKeyName(String keyName) {
		this.keyName = keyName;
	}
	
	public String getKeyType() {
		return keyType;
	}
	
	public void setKeyType(String keyType) {
		this.keyType = keyType;
	}

	@Override
    public int hashCode() {
	    final int prime = 31;
	    int result = 1;
	    result = prime * result
	            + ((this.keyName == null) ? 0 : this.keyName.hashCode());
	    result = prime * result
	            + ((this.keyType == null) ? 0 : this.keyType.hashCode());
	    result = prime
	            * result
	            + ((this.serviceName == null) ? 0 : this.serviceName.hashCode());
	    return result;
    }

	@Override
    public boolean equals(Object obj) {
	    if (this == obj)
		    return true;
	    if (obj == null)
		    return false;
	    if (getClass() != obj.getClass())
		    return false;
	    Primitive other = (Primitive) obj;
	    if (this.keyName == null) {
		    if (other.keyName != null)
			    return false;
	    } else if (!this.keyName.equals(other.keyName))
		    return false;
	    if (this.keyType == null) {
		    if (other.keyType != null)
			    return false;
	    } else if (!this.keyType.equals(other.keyType))
		    return false;
	    if (this.serviceName == null) {
		    if (other.serviceName != null)
			    return false;
	    } else if (!this.serviceName.equals(other.serviceName))
		    return false;
	    return true;
    }
	
	
}
